/**
 * 检查基本信息
 * @param oForm
 * @returns {boolean}
 */
function checkBasic(oForm) {
    var company_name = str_trim($(oForm).find('#company_name').val());
    if (company_name == '') {
        layerMsg('公司名称不能为空!', 2);
        $(oForm).find('#company_name').focus();
        $(oForm).find('#company_name').val(company_name);
        return false;
    }
    if ($(oForm).find('#comkind').val() == '') {
        layerMsg('请选择公司性质!', 2);
        return false;
    }
    if ($(oForm).find('#industry').val() == '') {
        layerMsg('请选择所属行业!', 2);
        return false;
    }
    if ($(oForm).find('#established').val() == '') {
        layerMsg('请选择成立年份!', 2);
        return false;
    }
    if ($(oForm).find('#employee_num').val() == '') {
        layerMsg('请选择员工数量!', 2);
        return false;
    }if ($(oForm).find('#temptation').val() == '') {
        layerMsg('请选择公司诱惑!', 2);
        return false;
    }
    var profile = str_trim($(oForm).find('#profile').html());
    if (profile == '') {
        layerMsg('公司简介不能为空!', 2);
        return false;
    }

    var contacts = str_trim($(oForm).find('#contacts').val());
    if (contacts == '') {
        layerMsg('联系人不能为空!', 2);
        $(oForm).find('#contacts').focus();
        $(oForm).find('#contacts').val(contacts);
        return false;
    }
    var mobile = str_trim($(oForm).find('#mobile').val());
    var phone = str_trim($(oForm).find('#phone').val());
    if( mobile == '' && phone == ''){
        layerMsg('手机号码不能为空!',2);
        $(oForm).find('#mobile').focus();
        $(oForm).find('#mobile').val(mobile);
        return false;
    }
    if( phone  != '' ) {
        var regu =/(^[0-9]{2,5}\-[0-9]{7,9})((\-\d{0,10})?)$/g;
        if(!regu.test(phone)){
            layerMsg('请输入正确的电话号码!',2);
            $(oForm).find('#phone').focus();
            $(oForm).find('#phone').val(phone);
            return false;
        }
    }

    var fax = str_trim($(oForm).find('#fax').val());
    if( fax != ''){
        var regu =/(^[0-9]{2,5}\-[0-9]{7,9})$/g;
        if(!regu.test(fax)){
            layerMsg('请输入正确的传真号码!',2);
            $(oForm).find('#fax').focus();
            $(oForm).find('#fax').val(fax);
            return false;
        }
    }
    var email = str_trim($(oForm).find('#email').val());
    if(email!= ''){
        var regu =/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
        if (!regu.test(email)){
            layerMsg('请输入正确的邮箱地址!',2);
            $(oForm).find('#email').focus();
            $(oForm).find('#email').val(email);
            return false;
        }
    }

    var qq = str_trim($(oForm).find('#qq').val());
    if (qq != '') {
        var regu =/(^[1-9]{1}[0-9]{4,15})$/g;
        if (!regu.test(qq)){
            layerMsg('请输入正确的QQ号码!',2);
            $(oForm).find('#qq').focus();
            $(oForm).find('#qq').val(email);
            return false;
        }
    }
    if ($(oForm).find('#region').val() == '') {
        layerMsg('请选择所在地区!', 2);
        return false;
    }
    var address = str_trim($(oForm).find('#address').html());
    if (address == '') {
        layerMsg('详细地址不能为空!', 2);
        return false;
    }

    $(oForm).find("input[type='submit']").val('保存中...');
    $(oForm).find("input[type='submit']").attr('disabled', true);
    return true;
}
